package com.power.project.api;

import com.power.common.domain.PageDataResponse;
import com.power.common.domain.ResponseDTO;
import com.power.project.model.bo.TagSaveBO;
import com.power.project.model.bo.TagUserSetBO;
import com.power.project.model.pageInfo.Ww_tagPageInfo;
import com.power.project.model.vo.TagVO;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import javax.validation.Valid;
import java.util.List;

/**
 * 标签 Feign
 */
@Validated
public interface IWw_tagFeign {

    /**
     * 标签分页列表(含人员信息)
     */
    @PostMapping("/ww_tag/list")
    ResponseDTO<PageDataResponse<TagVO>> list(@Valid @RequestBody Ww_tagPageInfo ww_tagPageInfo);

    /**
     * 标签列表(仅tagId+name)
     */
    @GetMapping("/ww_tag/allTags")
    ResponseDTO<List<TagVO>> findAllTags(@RequestParam("tenantId") String tenantId);

    /**
     * 根据标签id，查询当前已选择的人员id列表
     * @param tagId 标签id
     * @return 人员id列表 ww_user.userid
     */
    @GetMapping("/ww_tag/userIds")
    ResponseDTO<List<String>> userIds(@RequestParam("tagId") String tagId);

    /**
     * 删除标签
     */
    @PostMapping("/ww_tag/delete")
    ResponseDTO<Void> delete(@RequestParam("tagId") String tagId);

    /**
     * 修改或保存标签
     */
    @PostMapping("/ww_tag/save")
    ResponseDTO<Void> save(@Valid @RequestBody TagSaveBO ww_tag);

    /**
     * 添加成员到标签
     */
    @PostMapping("/ww_tag/batchSet")
    ResponseDTO<Void> batchSet(@Valid @RequestBody TagUserSetBO setBO);

}
